package org.calzz.jajb.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.calzz.jajb.converter.IConverter;

/**
 * Annotation which allows users to attach their own converters for certain
 * types by implementing <code>IConverter</code> interface in a proper way and
 * annotating getter methods of their beans. Note that this is only required
 * when you want to override an existing converter, e.g. if You want to format
 * <code>java.util.Date</code> in a different way than the default converter
 * does or You only want this particular method to use it. In other cases it's
 * better to register Your own converters by calling
 * <code>(Serializer/Deserializer).registerConverter(IConverter)</code> method
 * or through the XML configuration when using Spring Framework.
 * @see org.calzz.jajb.JsonSerializer#registerConverter(org.calzz.jajb.converter.IConverter)
 * @see org.calzz.jajb.JsonDeserializer#registerConverter(org.calzz.jajb.converter.IConverter)
 * 
 * @author Marek Brodziak <marek.brodziak@gmail.com>
 * @author Piotr Pejas <piotr.pejas@gmail.com>
 * @since Feb 6, 2008
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD })
public @interface Converter {
	Class<? extends IConverter> value();
}
